#ifndef __PARTHUS_HW_SCO_CODEC__
#define __PARTHUS_HW_SCO_CODEC__

/*
 * MODULE NAME:    hw_sco_codec.h
 * PROJECT CODE:   BlueStream
 * DESCRIPTION:    SCO Codec API
 * MAINTAINER:     Ivan Griffin
 * DATE:           26 March 2001
 *
 * SOURCE CONTROL: $Id: hw_sco_codec.h,v 1.2 2004/07/07 14:30:39 namarad Exp $
 *
 * LICENSE:
 *     This source code is copyright (c) 2001-2004 Ceva Inc.
 *     All rights reserved.
 *
 */

#include "sys_types.h"

/*
 * Module Types
 */

typedef enum HWsco_Codecs
{
    eHWsco_Linear_PCM,
	eHWsco_u_Law,
	eHWsco_A_Law,
	eHWsco_CVSD
} t_HWsco_Codecs;

typedef t_HWsco_Codecs t_HWsco_Input_Mode;
typedef t_HWsco_Codecs t_HWsco_Air_Mode;

typedef struct
{
    u_int8 mode;         /* TODO: need stronger type here */
    u_int8 data_format;  /* TODO: need stronger type here */
} t_HWsco_Generic_Mode;

typedef struct
{
    t_HWsco_Input_Mode input_mode;
    t_HWsco_Generic_Mode generic_mode;
    u_int32 sample_size; /* TODO: need stronger type here */
    u_int32 bit_posn;    /* TODO: need stronger type here */
} t_HWsco_Linear_PCM_Mode;

typedef struct
{
    t_HWsco_Input_Mode input_mode;
    t_HWsco_Generic_Mode generic_mode;
} t_HWsco_u_Law_Mode;

typedef struct
{
    t_HWsco_Input_Mode input_mode;
    t_HWsco_Generic_Mode generic_mode;
} t_HWsco_A_Law_Mode;

typedef union
{
    t_HWsco_Input_Mode input_mode;
	t_HWsco_Linear_PCM_Mode pcm;
    t_HWsco_A_Law_Mode a_law;
	t_HWsco_u_Law_Mode u_law;
} t_HWsco_Input_Mode_Descr;

/*
 * Module Prototypes
 */

void HWsco_Initialise(void);
t_error HWsco_Start(u_int8 sco_fifo);
t_error HWsco_Stop(u_int8 sco_fifo);


void HWsco_Set_Air_Mode(void);
void HWsco_Set_Input_Mode(void);

void HWsco_Set_Volume_Threshold(void);
void HWsco_Inc_Volume(void);
void HWsco_Dec_Volume(void);

#endif
